package org.jeecg.modules.wlhy.evaluation.service.impl;

import org.apache.ibatis.ognl.Evaluation;
import org.jeecg.modules.wlhy.evaluation.entity.HyEvaluation;
import org.jeecg.modules.wlhy.evaluation.mapper.HyEvaluationMapper;
import org.jeecg.modules.wlhy.evaluation.service.IHyEvaluationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * @Description: 评价表
 * @Author: jeecg-boot
 * @Date:   2020-12-16
 * @Version: V1.0
 */
@Service
public class HyEvaluationServiceImpl extends ServiceImpl<HyEvaluationMapper, HyEvaluation> implements IHyEvaluationService {

    @Autowired
    private HyEvaluationMapper hyEvaluationMapper;

    /**
     * 通过运单id获取评价信息
     * @param shippingNoteNumber
     * @return
     */
    public HyEvaluation getByShippingNoteNumber(String shippingNoteNumber){
        return hyEvaluationMapper.getByShippingNoteNumber(shippingNoteNumber);
    }
    /**
     * 通过货主id获取评价信息
     * @param customerId
     * @return
     */
    @Override
    public HyEvaluation getEvaluationByCid(String customerId){
        return hyEvaluationMapper.getEvaluationByCid(customerId);
    }
    /**
     * 通过司机id获取评价信息
     * @param driverId
     * @return
     */
    @Override
    public HyEvaluation getEvaluationByDid(String driverId){
        return hyEvaluationMapper.getEvaluationByDid(driverId);
    }
}
